package internal

import (
	"github.com/name5566/leaf/gate"
	"talent.com/agency_im/conf"
	"talent.com/agency_im/modules/core"
	"talent.com/server/durotar.git/leaf"
	"time"
)

type Module struct {
	*gate.Gate
}

func (m *Module) OnInit() {
	processor := leaf.MsgProcessor
	m.Gate = &gate.Gate{
		MaxConnNum:      20000,
		PendingWriteNum: 2000,
		MaxMsgLen:       1 * 1024 * 1024,
		WSAddr:          conf.ServerConfig().Server.WSAddr,
		HTTPTimeout:     5 * time.Second,
		LenMsgLen:       4,
		LittleEndian:    false,
		Processor:       processor,
		AgentChanRPC:    core.ChanRPC,
	}

}
